<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <link rel="stylesheet" type="text/css" href="../res/static/css/main.css">
    <link rel="stylesheet" type="text/css" href="../res/layui/css/layui.css">
    <script type="text/javascript" src="../res/layui/layui.js"></script>
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
</head>
<body>

<div class="site-nav-bg">
    <div class="site-nav w1200">
        <p class="sn-back-home" id="adm" style="display: none">
            <i class="layui-icon layui-icon-home"></i>
            <a href="/admin">后台管理</a>
        </p>
        <div class="sn-quick-menu">
            <div id="d1" style="display: none" class="login"><a href="/register" style="color: #0C0C0C">[注册]</a></div>
            <div id="d4" style="display: none" class="login"><a href="/login" style="color: #0C0C0C;margin-left: -10px">
                [登录]</a></div>
            <div id="d2" style="display: none" class="login"><a style="color: #1E9FFF" id="user"></a></div>
            <div id="d3" style="display: none" class="login"><a id="f1" style="color: #0C0C0C"
                                                                href="javascript:;">退出登录</a></div>
        </div>
    </div>
</div>


<div class="header">
    <div class="headerLayout w1200">
        <div class="headerCon">
            <h1 class="mallLogo">
                <a href="/index" title="宠物商城" id="a1">
                    <img style="width: 50%;height: 50%" src="../res/static/img/123.png">
                </a>
            </h1>
            <div class="mallSearch">
                <form action="" class="layui-form" novalidate>
                    <input type="text" name="title" required lay-verify="required" autocomplete="off"
                           class="layui-input" placeholder="请输入宠物名称">
                    <button class="layui-btn" lay-submit lay-filter="formDemo">
                        <i class="layui-icon layui-icon-search"></i>
                    </button>
                    <input type="hidden" name="" value="">
                </form>
            </div>
        </div>
    </div>
</div>


<div class="content content-nav-base about-content">
    <div class="main-nav">
        <div class="inner-cont0">
            <div class="inner-cont1 w1200">
                <div class="inner-cont2">
                    <a href="/index">首页</a>
                    <a href="/shopcart">购物车</a>
                    <a href="/about" class="active">关于我们</a>
                </div>
            </div>
        </div>
    </div>
    <div class="banner-box">
        <div class="banner"></div>
    </div>
    <div class="brief-content layui-clear w1200">
        <div class="img-box">
            <img src="../../upload/2020-11-06/202011421455420f03e2df6a5c43a3ad096ceec04dcd12.jpg">
            <img class="top" src="../../upload/2020-11-06/20201113150113eac81b623b204a1b9f00a68ec82de3fa.jpg">
        </div>
        <div class="text">
            <p>
        </div>
    </div>
    <div class="banner-text">
        <div class="w1200">
            <p>
        </div>
    </div>
    <div class="after-sale w1200">
        <h4>配送售后</h4>
        <div class="item-box">
            <div class="item item1">
                <div class="img-box">
                    <img src="../res/static/img/us_icon1.png">
                </div>
                <p>7天无理由退换货</p>
            </div>
            <div class="item item2">
                <div class="img-box">
                    <img src="../res/static/img/us_icon2.png">
                </div>
                <p>全场满99元顺丰包邮</p>
            </div>
            <div class="item item3">
                <div class="img-box">
                    <img src="../res/static/img/us_icon3.png">
                </div>
                <p>优质客服服务</p>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">

    layui.use(['layer', 'jquery'], function () {
        var $ = layui.jquery,
            layer = layui.layer;

        initIndex();

        function initIndex() {
            $.get("/findLoginInfo", {}, function (r) {
                if (r !== "null") {
                    $('#d1').css('display', 'none');
                    $('#d2').css('display', 'block');
                    $('#d3').css('display', 'block');
                    $('#d4').css('display', 'none');
                    $('#adm').css('display', 'block');
                    $('#a1').css('margin-left', '-86px');
                    $("#user").text("你好," + r + "!");
                    $("#c").css('display', 'inline');
                    $("#admin").css('display', 'inline');
                } else {
                    $('#d1').css('display', 'block');
                    $('#d4').css('display', 'block');
                    $('#d2').css('display', 'none');
                    $('#d3').css('display', 'none');
                    $('#adm').css('display', 'none');
                    $("#c").css('display', 'inline');
                    $('#a1').css('margin-left', '0px');
                    $("#admin").css('display', 'inline');
                }
            }, "text");
        }


        $("#f1").click(function () {
            layer.confirm('确定退出登录吗？', {icon: 3}, function (index) {
                $.get("/loginOut", {}, function (r) {
                    layer.close(index);
                    index = layer.load(1, {shade: [0.1, '#fff']});
                    parent.layer.msg('安全退出中...', {icon: 16, shade: 0.3, time: 5000});
                    $.get("/loginOut", {}, function (r) {
                        layer.closeAll('loading');
                        parent.layer.msg('退出成功！', {
                            icon: 1, time: 1000, shade: 0.2, end: function () {
                                window.location.reload();
                            }
                        });
                        layer.close(index);
                    });
                });
            });
        });
    });
</script>
</body>
</html>